package com.ssy.lingxi.purchase.entity.tender;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 在线评标实体类
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/3/1
 */
@Getter
@Setter
@Entity
@Table(schema = "public", name = "purchase_evaluation_invite")
public class EvaluationTenderOnline implements Serializable {
    private static final long serialVersionUID = -2707552416220593579L;
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="evaluation_invite_seq")
    @SequenceGenerator(sequenceName="purchase_evaluation_invite_seq", name="evaluation_invite_seq",allocationSize = 1)
    private Long id;

    /**
     * 评标专家
     */
    @JsonIgnore
    @ManyToOne(cascade = {CascadeType.PERSIST})
    @JoinColumn(name="expertExtractRecordId",referencedColumnName = "id")
    private ExpertExtractRecord expertExtractRecord;

    /**
     * 评标分类
     */
    @Column(columnDefinition = "varchar(60)", nullable = false)
    private String sort;

    /**
     * 评分项
     */
    @Column(columnDefinition = "varchar(100)", nullable = false)
    private String term;

    /**
     * 评分标准
     */
    @Column(columnDefinition = "varchar(1000)", nullable = false)
    private String standard;

    /**
     * 标准分
     */
    @Column(columnDefinition = "decimal", nullable = false)
    private Double standardScore;

    /**
     * 得分
     */
    @Column(columnDefinition = "decimal", nullable = false)
    private Double score;

    /**
     * 被评标的会员
     */
    @Column(columnDefinition = "int8", nullable = false)
    private Long inviteTenderMemberId;

    /**
     * 被评标的会员名称
     */
    @Column(columnDefinition = "varchar(50)", nullable = false)
    private String inviteTenderMemberName;
}
